package com.zline.foodraise.adapter;

import android.content.Context;
import android.view.ViewGroup;

import com.zline.foodraise.view.ReleaseDynamicPicItem;
import com.zline.foodraise.view.ReleaseDynamicPicItem_;

import org.androidannotations.annotations.EBean;
import org.androidannotations.annotations.RootContext;

/**
 * Created by heshantao on 15/7/8.
 * 动态发布下面的图片
 */
@EBean
public class ReleaseDynamicPicItemAdapter extends RecyclerViewBaseAdapter<String,ReleaseDynamicPicItem> {
    private static final String LOG_TAG=ReleaseDynamicPicItemAdapter.class.getSimpleName();
    @RootContext
    Context cxt;

    @Override
    protected ReleaseDynamicPicItem onCreateItemView(ViewGroup parent, int viewType) {
        return ReleaseDynamicPicItem_.build(cxt);
    }

    @Override
    public void onBindViewHolder(ViewWrapper<ReleaseDynamicPicItem> holder, int position) {
        ReleaseDynamicPicItem view=holder.getView();
        String imagePath=arrys.get(position);
        view.setRecyclerClickListener(itemClicked);
        view.bind(imagePath,position);
    }
}
